home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / ARCHIVERS / BEGINNER / TARZ / !tarZ / scandir < prev    next >
Text File  |  1999-04-24  |  469b  |  30 lines

  1. BEGIN {
  2.       char x[ 128 ];
  3.       y=1; }
  4.  
  5. /' /
  6.    {
  7.    if (y==1)
  8.       {
  9.       x=$1;
  10.       y=0;
  11.       }
  12.    else
  13.       x=substr($1,2);
  14.  
  15.    if (x=="Directory")
  16.       {
  17.       system(sprintf("access %s ",$2));
  18.       }
  19.    if (x=="File")
  20.       {
  21.       file=$2;
  22.       system(sprintf("access %s WR",$2)); 
  23.       command=sprintf("info %s",$2);
  24.       command | getline ;
  25.       close(command);
  26.       printf("settype %s %s\n",file,$3) > "<tarZ$use>.files._list" ; 
  27.       }
  28.    }
  29.  
  30.